package com.tplentiful.log.controller;

import cn.hutool.log.Log;
import com.tplentiful.log.pojo.TR;
import com.tplentiful.log.pojo.es.LogRes;
import com.tplentiful.log.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: tplentiful
 * @Since: 1.0
 **/
@RestController
@RequestMapping("/log/search")
public class SearchController {

    @Autowired
    private SearchService searchService;

    @GetMapping("/search")
    public TR<List<LogRes>> search() {
        List<LogRes> logResList = searchService.simpleSearch();
        return TR.ok("成功", logResList);
    }

}
